package com.qianfeng.missfood.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.lidroid.xutils.BitmapUtils;
import com.qianfeng.missfood.R;

/**
 * Created by Administrator on 15-8-17.
 */
public abstract class BaseAppFragment extends Fragment {

    public BitmapUtils bitmapUtils;

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        init();
    }

    public void init() {


    }


    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {

        bitmapUtils = new BitmapUtils(container.getContext());
        bitmapUtils.configDefaultLoadFailedImage(R.mipmap.shop_menu_moren_img);
        bitmapUtils.configDefaultLoadFailedImage(R.mipmap.shop_menu_moren_img);
        View view = inflater.inflate(getLayoutRes(), container, false);
        initView(view);
        initData();
        return view;
    }

    public void initData() {
    }

    public void initView(View view) {

    }


    public abstract int getLayoutRes();

}
